<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0px;
				padding: 0px;
				border: 0px;
			}
			.a{
				height: 100px;
				width: 100px;
			}
			#a{
				height: 400px;
				width: 400px;
				display: none;
				margin: 0px;
				padding: 0px;
				border: 0px;
				background-image: url(img/1.jpg);
				background-repeat: no-repeat;
				background-size: 800px;
				
				
			}
			#b{
				height: 50px;
				width: 50px;
				background: red;
				opacity: 0.5;
				position: absolute;
				z-index: 100;
				display: none;
			}
		</style>
	</head>
	<body>
	<div id="">
		<div id="b">
		
		</div>
		<img class="a" src="img/1.jpg" />
	</div>
	
	<div id="a">
		
	</div>
	

	<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">

		$(function(){
			$("img").mouseenter(function(){
				$('#a').show();
				
				
				
				$("img").mousemove(function(e){
				//0    100  
				//

					
				$("#a").css("background-position-x",-(e.pageX*4));
				$("#a").css("background-position-y",-(e.pageY*4))
				//00              -400  0 
				//0 -400        -400 -400
				
					
					
				})

				
			})
			$("img").mouseout(function(){
				$('#a').hide();
			})
		});
	</script>
	</body>
</html>
